package pers.lmd.service.impl;

import cn.dev33.satoken.stp.StpUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import pers.lmd.domain.entity.Health;
import pers.lmd.service.IHealthService;
import pers.lmd.mapper.HealthMapper;
import org.springframework.stereotype.Service;

/**
* @author 10149
* @description 针对表【health】的数据库操作Service实现
* @createDate 2023-04-24 20:12:57
*/
@Service
public class HealthServiceImpl extends ServiceImpl<HealthMapper, Health>
    implements IHealthService {

    @Override
    public void saveHealth(String status,Integer isCough,Double temperature,String address) {
        Health health = new Health();
        Long id = StpUtil.getLoginIdAsLong();
        health.setStatus(status);
        health.setIsCough(isCough);
        health.setTemperature(temperature);
        health.setAddress(address);
        health.setSid(id);
        save(health);
    }
}




